import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/user',
    name: 'User',
    redirect: '/user/index',
    meta: {
      title: '个人中心'
    },
    children: [
      {
        path: 'index',
        name: 'Index',
        component: () => import('@renderer/views/user/index.vue'),
        meta: {
          title: '',
          tab: false
        }
      },
      {
        path: 'vip',
        name: 'Vip',
        component: () => import('@renderer/views/user/vip/index.vue'),
        meta: {
          title: '',
          tab: false
        }
      },
      {
        path: 'cart',
        name: 'Cart',
        component: () => import('@renderer/views/user/cart/index.vue'),
        meta: {
          title: '购物车',
          tab: false
        }
      },
      {
        path: 'order',
        name: 'UserOrder',
        component: () => import('@renderer/views/user/order/index.vue'),
        meta: {
          title: '订单',
          tab: false
        }
      },
      {
        path: 'help',
        name: 'Help',
        component: () => import('@renderer/views/user/help.vue'),
        meta: {
          title: '反馈中心',
          tab: false
        }
      },
      {
        path: 'coupon',
        name: 'UserCoupon',
        component: () => import('@renderer/views/user/coupon/index.vue'),
        meta: {
          title: '我的优惠券',
          tab: false
        }
      }
    ]
  }
]

export default routes
